Skip to content

Conversation

@yyoon4
Copy link
Contributor

@yyoon4 yyoon4 commented Nov 25, 2025

Description

Add support for SWOT–HyMAP2 DA (#1749)

Currently, the SWOT DA code supports only HyMAP2. Additional code for HyMAP3 will be submitted later.

Testcase

/discover/nobackup/yyoon4/lis7/Testcase/swot_da

@jvgeiger jvgeiger self-requested a review December 4, 2025 15:56
@jvgeiger jvgeiger self-assigned this Dec 4, 2025
@jvgeiger
Copy link
Contributor

jvgeiger commented Dec 4, 2025

@yyoon4 I cannot read your input/SWOT_lis_id_ohio_10km_v16.nc file. Would you please fix its permissions?

@yyoon4
Copy link
Contributor Author

yyoon4 commented Dec 4, 2025

@yyoon4 I cannot read your input/SWOT_lis_id_ohio_10km_v16.nc file. Would you please fix its permissions?

Done

@jvgeiger
Copy link
Contributor

jvgeiger commented Dec 4, 2025

Thanks.

@jvgeiger
Copy link
Contributor

jvgeiger commented Dec 9, 2025

Would you point me to your ldt.config file for creating lis_input.ohio.noahmp401.hymap.nc? Thanks.

@yyoon4
Copy link
Contributor Author

yyoon4 commented Dec 9, 2025

Would you point me to your ldt.config file for creating lis_input.ohio.noahmp401.hymap.nc? Thanks.

I have added the ldt.config and output file here:
/discover/nobackup/yyoon4/lis7/Testcase/swot_da/ldt

@jvgeiger
Copy link
Contributor

jvgeiger commented Dec 9, 2025

Thanks.

I am having trouble exactly reproducing your lis_input.ohio.noahmp401.hymap.nc. How did you compile LDT?

@yyoon4
Copy link
Contributor Author

yyoon4 commented Dec 10, 2025

Thanks.

I am having trouble exactly reproducing your lis_input.ohio.noahmp401.hymap.nc. How did you compile LDT?

I used an older LDT executable to generate the LDT output. Below are the compilation options I selected:
Assume little/big_endian data format (1-little, 2-big, default=2): 1
NETCDF use deflate level? (1 to 9-yes, 0-no, default=1): 9

I re-ran the process using the up-to-date LDT code with the same compilation options. However, the LDT outputs were still different. After reviewing all variables by comparing the old and new LDT outputs, I found that everything was identical except for SLOPE. I believe my older LDT code may not include some updates.

Since I do not use the SLOPE variable in LIS, this difference does not affect any LIS outputs.

@jvgeiger
Copy link
Contributor

jvgeiger commented Jan 8, 2026

@yyoon4, your changes to lis/routing/HYMAP2_router/da_WL/HYMAP2_daWL_Mod.F90 broke one of our existing testcases.

You changed site_id to count and distance to weight.

status = nf90_inq_dimid(nid,"site_id",siteId)
status = nf90_inq_dimid(nid,"count",siteId)

status = nf90_inq_varid(nid,'distance',drainid)
status = nf90_inq_varid(nid,'weight',drainid)

How is the "HYMAP2 localization weight map:" file created?

May I rename these two names back to their previous values?

@yyoon4
Copy link
Contributor Author

yyoon4 commented Jan 9, 2026

@yyoon4, your changes to lis/routing/HYMAP2_router/da_WL/HYMAP2_daWL_Mod.F90 broke one of our existing testcases.

You changed site_id to count and distance to weight.

status = nf90_inq_dimid(nid,"site_id",siteId) status = nf90_inq_dimid(nid,"count",siteId)

status = nf90_inq_varid(nid,'distance',drainid) status = nf90_inq_varid(nid,'weight',drainid)

How is the "HYMAP2 localization weight map:" file created?

May I rename these two names back to their previous values?

@jvgeiger I believe—though I am not entirely sure—that your code contains a mix of old and new implementations. The following two lines are correct; the others are old and no longer used:

status = nf90_inq_dimid(nid,"count",siteId)
status = nf90_inq_varid(nid,'weight',drainid)

Below is the code I originally submitted.

133 write(LIS_logunit,*)'[INFO] Reading localization map from '&
134 //trim(localWeightMap)
135 status = nf90_open(path=localWeightMap,&
136 mode=NF90_NOWRITE,ncid=nid)
137 call LIS_verify(status,'Error in nf90_open in HYMAP2_daWL_Mod')
138
139 status = nf90_inq_dimid(nid,"east_west",ncId)
140 call LIS_verify(status,'Error in nf90_inq_dimid in HYMAP2_daWL_Mod')
141
142 status = nf90_inq_dimid(nid,"north_south",nrId)
143 call LIS_verify(status,'Error in nf90_inq_dimid in HYMAP2_daWL_Mod')
144
145 status = nf90_inq_dimid(nid,"count",siteId)
146 call LIS_verify(status,'Error in nf90_inq_dimid in HYMAP2_daWL_Mod')
147
148 status = nf90_inquire_dimension(nid,ncId, len=nc)
149 call LIS_verify(status,'Error in nf90_inquire_dimension in HYMAP2_daWL_Mod')
150
151 status = nf90_inquire_dimension(nid,nrId, len=nr)
152 call LIS_verify(status,'Error in nf90_inquire_dimension in HYMAP2_daWL_Mod')
153
154 status = nf90_inquire_dimension(nid,siteId, &
155 len=HYMAP2_daWL_struc(n)%nsites)
156 call LIS_verify(status,'Error in nf90_inquire_dimension in HYMAP2_daWL_Mod')
157
158 status = nf90_inq_varid(nid,'weight',drainid)
159 call LIS_verify(status,'distance field not found in the localization weight file')
160
161 status = nf90_inq_varid(nid,'sites',sid)
162 call LIS_verify(status,'sites field not found in the localization weight file')

Also localization map information:

netcdf distance_upstream_map_full_ohio_010 {
dimensions:
east_west = 120 ;
north_south = 85 ;
count = 729 ;
variables:
float lon(north_south, east_west) ;
lon:units = "degrees_east" ;
lon:standard_name = "longitude" ;
float lat(north_south, east_west) ;
lat:units = "degrees_north" ;
lat:standard_name = "latitude" ;
float distance(count, north_south, east_west) ;
distance:units = "km" ;
distance:standard_name = "distance" ;
float weight(count, north_south, east_west) ;
weight:units = "km2/km2" ;
weight:standard_name = "drain_ratio" ;
float sites(north_south, east_west) ;
sites:units = "-" ;
sites:standard_name = "sites" ;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants