Conversation
tdcwilliams
left a comment
There was a problem hiding this comment.
looks fine, but some suggestions for simplifying
| M_ice_amsr2_elements_dataset.interpolated=false; | ||
| M_ice_cs2_smos_elements_dataset.interpolated=false; | ||
| M_ice_smos_elements_dataset.interpolated=false; | ||
| M_ice_glorys12_elements_dataset.interpolated=false; |
There was a problem hiding this comment.
not needed for initialising dataset
There was a problem hiding this comment.
But other initialising datasets are here too, no ?
There was a problem hiding this comment.
yep, but they don't need to be
| M_ice_nic_weekly_elements_dataset=DataSet("ice_nic_weekly_elements"); | ||
| M_ice_cs2_smos_elements_dataset=DataSet("ice_cs2_smos_elements"); | ||
| M_ice_smos_elements_dataset=DataSet("ice_smos_elements"); | ||
| M_ice_glorys12_elements_dataset=DataSet("glorys12_elements"); |
There was a problem hiding this comment.
could move definition to glorys12ice function since it is just used at init time (doesn't need to be a global var)
|
|
||
| void | ||
| FiniteElement::glorys12Ice() | ||
| { |
There was a problem hiding this comment.
add dataset definition here
| M_conc[i] = (tmp_var>1e-14) ? tmp_var : 0.; // TOPAZ puts very small values instead of 0. | ||
| tmp_var=M_init_thick[i]; | ||
| M_thick[i] = tmp_var ; | ||
| tmp_var=0.;//This is a test for the southern ocean | ||
| M_snow_thick[i] = (tmp_var>1e-14) ? tmp_var : 0.; // TOPAZ puts very small values instead of 0. |
There was a problem hiding this comment.
change reference to TOPAZ in comment?
| Dataset M_ice_nic_weekly_elements_dataset; | ||
| Dataset M_ice_cs2_smos_elements_dataset; | ||
| Dataset M_ice_smos_elements_dataset; | ||
| Dataset M_ice_glorys12_elements_dataset; |
Accidental commit of a backup file
Accidental commit of a backup file.
einola
left a comment
There was a problem hiding this comment.
Looks fine, but I'm confused about the apparent lack of snow in GLORYS. So, if there's snow in the files, then I added a few comments on how that should be handled.
| FiniteElement::glorys12Ice() | ||
| { | ||
| // Initialize the sea ice conc. and thick. from GLORYS12 reanalysis or forecast. | ||
| // Snow thickness is 0 by default (used in southern ocean, with no equivalent of Warren Climatology) |
There was a problem hiding this comment.
Isn't there snow thickness in GLORYS? It should be because it's a reanalysis. No need for Warren, just read directly from the GLORYS file.
(I know we talked about this, but it seems my brain was in a low gear)
| Dataset ice_glorys12_elements_dataset = DataSet("glorys12_elements"); | ||
| external_data M_init_conc = ExternalData(&ice_glorys12_elements_dataset,M_mesh,3,false,time_init); | ||
| external_data M_init_thick = ExternalData(&ice_glorys12_elements_dataset,M_mesh,4,false,time_init); | ||
|
|
There was a problem hiding this comment.
If there's snow in the file then:
| external_data M_init_snowthick = ExternalData(&ice_glorys12_elements_dataset,M_mesh,5,false,time_init); |
| tmp_var=0.;//This is a test for the southern ocean | ||
| M_snow_thick[i] = (tmp_var>1e-14) ? tmp_var : 0.; |
There was a problem hiding this comment.
If there's snow in the file then:
| tmp_var=0.;//This is a test for the southern ocean | |
| M_snow_thick[i] = (tmp_var>1e-14) ? tmp_var : 0.; | |
| tmp_var=M_init_snowthick[i]; | |
| M_snow_thick[i] = (tmp_var>1e-14) ? tmp_var : 0.; |
52d7722 to
c4222c3
Compare
|
Haha, ok, thanks Tim!
From: Timothy Williams ***@***.***>
Date: Tuesday, 30 August 2022 at 16:53
To: nansencenter/nextsim ***@***.***>
Cc: Guillaume Boutin ***@***.***>, Author ***@***.***>
Subject: Re: [nansencenter/nextsim] Initialise ice glorys (PR #606)
@tdcwilliams commented on this pull request.
________________________________
In model/finiteelement.cpp<#606 (comment)>:
@@ -619,6 +619,7 @@ FiniteElement::assignVariables()
M_ice_amsr2_elements_dataset.interpolated=false;
M_ice_cs2_smos_elements_dataset.interpolated=false;
M_ice_smos_elements_dataset.interpolated=false;
+ M_ice_glorys12_elements_dataset.interpolated=false;
yep, but they don't need to be
—
Reply to this email directly, view it on GitHub<#606 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AK5CRNDJLKRDGA77OVTAZG3V3YN7DANCNFSM576CTZ4Q>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
|
There should be snow thickness in the model, but they haven’t made it available in the reanalysis.
Maybe we can send a request to CMEMS, I suppose it would not be much work for them and they could be happy to see we use products developed at Mercator.
Cheers,
From: Einar Örn Ólason ***@***.***>
Date: Wednesday, 31 August 2022 at 08:45
To: nansencenter/nextsim ***@***.***>
Cc: Guillaume Boutin ***@***.***>, Author ***@***.***>
Subject: Re: [nansencenter/nextsim] Initialise ice glorys (PR #606)
@einola commented on this pull request.
Looks fine, but I'm confused about the apparent lack of snow in GLORYS. So, if there's snow in the files, then I added a few comments on how that should be handled.
________________________________
In model/finiteelement.cpp<#606 (comment)>:
@@ -13021,6 +13025,53 @@ FiniteElement::smosIce()
}
}//smosIce
+void
+FiniteElement::glorys12Ice()
+{
+ // Initialize the sea ice conc. and thick. from GLORYS12 reanalysis or forecast.
+ // Snow thickness is 0 by default (used in southern ocean, with no equivalent of Warren Climatology)
Isn't there snow thickness in GLORYS? It should be because it's a reanalysis. No need for Warren, just read directly from the GLORYS file.
(I know we talked about this, but it seems my brain was in a low gear)
________________________________
In model/dataset.cpp<#606 (comment)>:
+ name: "sithick",
+ dimensions: dimensions,
+ land_mask_defined: false,
+ land_mask_value: 0.,
+ NaN_mask_defined: false,
+ NaN_mask_value: 0.,
+ use_FillValue: true,
+ use_missing_value: true,
+ a: 1.,
+ b: 0.,
+ Units: "m",
+ loaded_data: loaded_data_tmp,
+ interpolated_data: interpolated_data_tmp,
+ wavDirOptions: wavdiropt_none
+ };
+
If there's now in the file then (assuming the variable is called snthick):
⬇️ Suggested change
-
+
+ Variable snowthick={
+ filename_string: "", // All variables are in the same (grid) file
+ name: "snthick",
+ dimensions: dimensions,
+ land_mask_defined: false,
+ land_mask_value: 0.,
+ NaN_mask_defined: false,
+ NaN_mask_value: 0.,
+ use_FillValue: true,
+ use_missing_value: true,
+ a: 1.,
+ b: 0.,
+ Units: "m",
+ loaded_data: loaded_data_tmp,
+ interpolated_data: interpolated_data_tmp,
+ wavDirOptions: wavdiropt_none
+ };
________________________________
In model/dataset.cpp<#606 (comment)>:
@@ -2566,10 +2602,12 @@ DataSet::DataSet(char const *DatasetName)
};
//VAR
- std::vector<Variable> variables_tmp(3);
+ std::vector<Variable> variables_tmp(5);
If there's snow in the file then:
⬇️ Suggested change
- std::vector<Variable> variables_tmp(5);
+ std::vector<Variable> variables_tmp(6);
________________________________
In model/dataset.cpp<#606 (comment)>:
variables_tmp[0] = sst;
variables_tmp[1] = sss;
variables_tmp[2] = mld;
+ variables_tmp[3] = conc;
+ variables_tmp[4] = thick;
If there's snow in the file then:
⬇️ Suggested change
-
+ variables_tmp[5] = snowthick;
+
________________________________
In model/finiteelement.cpp<#606 (comment)>:
@@ -13021,6 +13025,53 @@ FiniteElement::smosIce()
}
}//smosIce
+void
+FiniteElement::glorys12Ice()
+{
+ // Initialize the sea ice conc. and thick. from GLORYS12 reanalysis or forecast.
+ // Snow thickness is 0 by default (used in southern ocean, with no equivalent of Warren Climatology)
+ Dataset ice_glorys12_elements_dataset = DataSet("glorys12_elements");
+ external_data M_init_conc = ExternalData(&ice_glorys12_elements_dataset,M_mesh,3,false,time_init);
+ external_data M_init_thick = ExternalData(&ice_glorys12_elements_dataset,M_mesh,4,false,time_init);
+
If there's snow in the file then:
⬇️ Suggested change
-
+
+ external_data M_init_snowthick = ExternalData(&ice_glorys12_elements_dataset,M_mesh,5,false,time_init);
________________________________
In model/finiteelement.cpp<#606 (comment)>:
+ tmp_var=0.;//This is a test for the southern ocean
+ M_snow_thick[i] = (tmp_var>1e-14) ? tmp_var : 0.;
If there's snow in the file then:
⬇️ Suggested change
- tmp_var=0.;//This is a test for the southern ocean
- M_snow_thick[i] = (tmp_var>1e-14) ? tmp_var : 0.;
+ tmp_var=M_init_snowthick[i];
+ M_snow_thick[i] = (tmp_var>1e-14) ? tmp_var : 0.;
—
Reply to this email directly, view it on GitHub<#606 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AK5CRNBSG4KGNNTJJZ3BDEDV335PXANCNFSM576CTZ4Q>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
|
I see. It's strange that they don't output the snow - but maybe it's just really bad!?! :) Would be nice to send a request to them, if you know how to do that. |
Adding the possibility to initialize sea ice with GLORYS12.
For use in the Antarctic. Does not use a snow climatology (snow thickness is 0).
Compiles and run